package com.huanzhidadi.rabbitmq.rabbitmq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 接收fanout模式消息
 */
@Slf4j
@Component
@RabbitListener(queues = "fanoutA")
public class FanoutAReceiver {

    @RabbitHandler
    public void process(String message) {
        log.info("FanoutAReceiver : {}", message);
    }
}
